<!--
 * @Author: daidai
 * @Date: 2022-03-01 09:16:22
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2022-09-29 15:12:34
 * @FilePath: \web-pc\src\pages\big-screen\components\item-wrap\item-wrap.vue
-->
<template>
  <!-- <dv-border-box-7
    class="lr_titles"
    :color="color"
    :backgroundColor="backgroundColor"
  > -->
  <div class="lr_titles" :class="[type]">
    <div class="item-title" v-if="title !== ''">
      <!-- <div class="zuo"></div> -->
      <div class="title-inner">
        {{ title }}
      </div>
      <div class="you"></div>
    </div>
    <div :class="title !== '' ? 'item_title_content' : 'item_title_content_def'">
      <!-- <div class="more" @click="clickTitle">更多数据</div> -->
      <slot></slot>
    </div>
  </div>
  <!-- </dv-border-box-7> -->
</template>

<script>
export default {
  data() {
    return {
      // color: ["#0a5c91", "#082b5a"],
      // color: ['#139DEC', '#0a5c91'],
      color: ['rgba(10, 92, 145, 0.1)', '#73e1ff'],
      backgroundColor: 'rgba(7, 28, 69, 0.6)',
    };
  },
  props: {
    title: {
      type: String,
      default: () => '',
    },
    reverse: {
      type: Boolean,
      default: () => false,
    },
    type: {
      type: String,
      default: 'leftboxbg',
    },
  },
  created() { },

  mounted() { },
  methods: {
    clickTitle() {
      this.$emit('click');
    },
  },
};
</script>
<style lang="scss" scoped>
$item-title-height: 68px;
$item_title_content-height: calc(100% - 68px);

.lr_titles {
  box-sizing: border-box;
  // margin: 0 10px;
  padding: 20px;
  pointer-events: auto;

  // background: url('../../assets/img/launch/internet/leftbox.png') no-repeat top left;
  // background-size: cover;
  :deep(.border-box-content) {
    box-sizing: border-box;
    padding: 6px 16px 0px;
  }

  .item-title {
    // height: $item-title-height + 4px;
    // line-height: $item-title-height;
    width: 100%;
    color: #31abe3;
    position: relative;
    display: flex;
    // flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 15px;

    .zuo,
    .you {
      // width: 100%;
      width: 65px;
      height: 9px;
      background: url('../../assets/img/launch/internet/titleIcon.png') no-repeat center;
      background-position: center center;
      background-size: 65px 9px;
      margin-left: 15px;
    }

    .title-inner {
      // font-family: PangMenZhengDao;
      font-size: 16px;
      line-height: 20px;
      height: 20px;
      // font-weight: 600;
      letter-spacing: 2px;
      color: #fff;
      margin-bottom: -2px;
      // width: 100%;
      text-align: center;
      margin-left: 21px;
    }
  }

  .item_title_content {
    height: $item_title_content-height;
  }

  .item_title_content_def {
    width: 100%;
    height: 100%;
  }

  .more {
    position: absolute;
    right: 40px;
    bottom: 20px;
    font-size: 14px;
    cursor: pointer;
    animation: scaleAnimation 1.5s ease-in-out infinite;

    &:hover {
      animation-play-state: paused;
    }

    &::after {
      position: absolute;
      top: -4px;
      content: url('../../assets/img/launch/avator/more.png');
    }

    //   transform: rotate(-20deg); // 设置旋转角度为90度
    //   transform-origin: center center; // 设置旋转中心为元素中心
    //   transition: all 0.5s;
  }
}

.leftboxbg {
  width: 542px;
  height: 242px;
  background: url('../../assets/img/launch/internet/leftbox.png') no-repeat top left;
  background-size: 542px 242px;
}

.centertopbox {
  width: 587px;
  height: 262px;
  background: url('../../assets/img/launch/internet/centertopbox.png') no-repeat top left;
  background-size: 587px 262px;
}

.centerbottombox {
  width: 412px;
  height: 235px;
  background: url('../../assets/img/launch/internet/centertopbox.png') no-repeat top left;
  background-size: 412px 235px;
}

.homeTopBox {
  width: 297px;
  height: 292px;
  background: url('../../assets/img/launch/internet/homeTopbox.png') no-repeat top left;
  background-size: 297px 292px;
}

.homeBottomBox {
  width: 297px;
  height: 207px;
  background: url('../../assets/img/launch/internet/homeBottombox.png') no-repeat top left;
  background-size: 297px 207px;
}

// 定义缩放动画
@keyframes scaleAnimation {
  0% {
    // transform: scale(1);
    // transform: rotate(0deg); // 设置旋转角度为90度
  }

  50% {
    // transform: scale(1.02);
    color: #fff;
    // transform: rotate(-5deg); // 设置旋转角度为90度
  }

  100% {
    // transform: scale(1);
    // transform: rotate(0deg); // 设置旋转角度为90度
  }
}
</style>
